home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume1 / calentool / patch4a < prev    next >
Encoding:
Internet Message Format  |  1989-10-26  |  52.4 KB

  1. Subject:  v01i072:  Patches for calentool (to patchlevel 4), Part01/04
  2. Newsgroups: comp.sources.sun
  3. Approved: mcgrew@aramis.rutgers.edu
  4.  
  5. Submitted-by: Bill Randle <billr@saab.cna.tek.com>
  6. Posting-number: Volume 1, Issue 72
  7. Archive-name: calentool/patch4a
  8.  
  9.  
  10.  
  11.    These are patches to calentool to take it to patchlevel 4 from
  12. patchlevel 2 (patchlevel 3 is incorporated).  Use the program "patch"
  13. to insert these fixes after unsharing the files.
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 1 (of 4)."
  22. # Contents:  patches04a
  23. # Wrapped by billr@saab on Tue Sep 19 06:29:30 1989
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'patches04a' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'patches04a'\"
  27. else
  28. echo shar: Extracting \"'patches04a'\" \(49839 characters\)
  29. sed "s/^X//" >'patches04a' <<'END_OF_FILE'
  30. XIndex: patchlevel.h
  31. XPrereq: 2.3
  32. X*** /tmp/,RCSt1a06183    Tue Sep 19 06:20:43 1989
  33. X--- patchlevel.h    Tue Sep 19 06:20:19 1989
  34. X***************
  35. X*** 1,5
  36. X  /*
  37. X!  * $Header: patchlevel.h,v 2.3 89/05/16 16:31:28 billr Exp $
  38. X   */
  39. X  /*
  40. X   * patchlevel.h - current patchlevel of calentool program
  41. X
  42. X--- 1,5 -----
  43. X  /*
  44. X!  * $Header: patchlevel.h,v 2.5 89/09/19 06:19:56 billr Exp $
  45. X   */
  46. X  /*
  47. X   * patchlevel.h - current patchlevel of calentool program
  48. X***************
  49. X*** 5,8
  50. X   * patchlevel.h - current patchlevel of calentool program
  51. X   */
  52. X  
  53. X! #define PATCHLEVEL    2
  54. X
  55. X--- 5,8 -----
  56. X   * patchlevel.h - current patchlevel of calentool program
  57. X   */
  58. X  
  59. X! #define PATCHLEVEL    4
  60. X*** /tmp/,RCSt1a06154    Tue Sep 19 06:18:16 1989
  61. X--- PATCHLOG    Tue Sep 19 06:17:30 1989
  62. X***************
  63. X*** 1,4
  64. X! # $Header: PATCHLOG,v 2.3 89/05/16 16:32:23 billr Exp $
  65. X  
  66. X  #$Log:    PATCHLOG,v $
  67. X  # Revision 2.3  89/05/16  16:32:23  billr
  68. X
  69. X--- 1,4 -----
  70. X! # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
  71. X  
  72. X  #$Log:    PATCHLOG,v $
  73. X  # Revision 2.5  89/09/19  06:17:10  billr
  74. X***************
  75. X*** 1,6
  76. X  # $Header: PATCHLOG,v 2.3 89/05/16 16:32:23 billr Exp $
  77. X  
  78. X  #$Log:    PATCHLOG,v $
  79. X  # Revision 2.3  89/05/16  16:32:23  billr
  80. X  # Fix bug whereby nfs mounted appointment files were not being
  81. X  # properly updated.  Add support for PostScript pretty printing
  82. X
  83. X--- 1,38 -----
  84. X  # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
  85. X  
  86. X  #$Log:    PATCHLOG,v $
  87. X+ # Revision 2.5  89/09/19  06:17:10  billr
  88. X+ # Patchlevel 4 of calentool. Fixes the following bug reports:
  89. X+ # 
  90. X+ # Bug fix in pcal.c for printing month of September <alexl@daemon.cna.tek.com>
  91. X+ # Bug fix for 386i machines when viewing long appointment strings <baron@neptune.cs.ucla.edu>
  92. X+ # Fix typos and clean up man page <rodgers@maxwell.mmwb.ucsf.edu>
  93. X+ # 
  94. X+ # Revision 2.4  89/08/11  08:34:47  billr
  95. X+ # Patchlevel 3 of calentool. Fixes the following bug reports:
  96. X+ # 
  97. X+ # Bug fix for moontool <kelvin%throop@acad.uucp>
  98. X+ # Bug fix/new version of passover() <amos@nsc.com>
  99. X+ # Bug in moon phase calculation <kent@tfd.com>, <ras@needle1.bellcore.com>, <roberts%studguppy@lanl.gov>, <darcic@lachlan.sts.te.com>
  100. X+ # Check return from get_defaults <ian@sq.com>
  101. X+ # Cleanup Makefile <casey@gauss.llnl.gov>
  102. X+ # Idea for monthly printout for terminal users <ian@sq.com>
  103. X+ # Makefile did not copy dates/computing to lib dir <jmc@ptsfa.pacbell.com>
  104. X+ # Missing arg for rotate function in ras2ps <jasmerb@hobbes.cs.orst.edu>
  105. X+ # More makefile cleanup <lwv27%chemabs@cis.ohio-state.edu>
  106. X+ # Off by one in mt2ct conversion <tom@cis.udel.edu>, <kas@cs.aber.ac.uk>, <paul%gill@uunet.uu.net>
  107. X+ # Optimize nr weeks calculation for month display <rwolff@noao.edu>
  108. X+ # Prevent calentool from sending mail when there are no appts <zander%trak@lanl.gov>, <john@math.nwu.edu>, <kayhan@cleopatra.usc.edu>
  109. X+ # Raster print command missing '-v' argument <hleroy@presto.irisa.fr>
  110. X+ # Scrambled moon icon on 386i <scott@cfi.com>, <lwv27%chemabs@cis.ohio-state.edu>, <syd@dsi.com>, <alfred@mcc.com>
  111. X+ # Seg fault when cursor moved to long appt entry (386i) <alfred@mcc.com>, <jmc@pbjmc.pacbell.com>, <baron@neptune.cs.ucla.edu>
  112. X+ # Set file access permissions on tmp file to match .appointments file <brooks@ge-dab.ge.com>
  113. X+ # Space date file <steve@prism.gatech.edu>
  114. X+ # Typo in man page "Save" file shoudl be "Update" file <lwv27%chemabs@cis.ohio-state.edu>
  115. X+ # Typo in riseset.c (tzp.minuteswest should be tzp.tz_minuteswest) <hleroy@presto.irisa.fr>, <correira@austin.lockheed.com>
  116. X+ # When deleteing an overlapping entry, background entry is not displayed <rgh@shell.uucp>
  117. X+ # Wrong week displayed when selecting a week in month display <rodgers@maxwell.mmwb.ucsf.edu>
  118. X+ #
  119. X  # Revision 2.3  89/05/16  16:32:23  billr
  120. X  # Fix bug whereby nfs mounted appointment files were not being
  121. X  # properly updated.  Add support for PostScript pretty printing
  122. X*** /tmp/,RCSt1a05523    Wed Jul 19 20:45:38 1989
  123. X--- calentool.c    Wed Jul 19 20:26:26 1989
  124. X***************
  125. X*** 1,5
  126. X  /*
  127. X!  * $Header: calentool.c,v 2.1 89/05/09 15:28:43 billr Exp $
  128. X   */
  129. X  /*
  130. X   * calentool.c
  131. X
  132. X--- 1,5 -----
  133. X  /*
  134. X!  * $Header: calentool.c,v 2.2 89/07/19 20:25:41 billr Exp $
  135. X   */
  136. X  /*
  137. X   * calentool.c
  138. X***************
  139. X*** 155,160
  140. X  {
  141. X      int   flag, i;
  142. X      int   printit = 0, toolrunning = 1, user_pos = 0;
  143. X      extern char *optarg;
  144. X      
  145. X      if (progname = rindex(*argv, '/'))
  146. X
  147. X--- 155,161 -----
  148. X  {
  149. X      int   flag, i;
  150. X      int   printit = 0, toolrunning = 1, user_pos = 0;
  151. X+     int   printit_dst = 0;
  152. X      extern char *optarg;
  153. X      
  154. X      if (progname = rindex(*argv, '/'))
  155. X***************
  156. X*** 171,177
  157. X      working_msg = 1;
  158. X  
  159. X      /*
  160. X!      * Check for -p or -m option, which means we don't want
  161. X       * to create the tool. Also check for -Wp so we can supply
  162. X       * a resonable default if the user doesn't supply one.
  163. X       */
  164. X
  165. X--- 172,178 -----
  166. X      working_msg = 1;
  167. X  
  168. X      /*
  169. X!      * Check for -p, -P or -m option, which means we don't want
  170. X       * to create the tool. Also check for -Wp so we can supply
  171. X       * a resonable default if the user doesn't supply one.
  172. X       */
  173. X***************
  174. X*** 177,184
  175. X       */
  176. X      i = argc;
  177. X      while (--i > 0) {
  178. X!         if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "-m")
  179. X!             || !strcmp(argv[i], "-P"))
  180. X              toolrunning = 0;
  181. X          if (!strcmp(argv[i], "-Wp"))
  182. X              user_pos = 1;
  183. X
  184. X--- 178,194 -----
  185. X       */
  186. X      i = argc;
  187. X      while (--i > 0) {
  188. X!         if (!strncmp(argv[i], "-p", 2) || !strcmp(argv[i], "-m")
  189. X!             || !strncmp(argv[i], "-P", 2)) {
  190. X!             /* standard getopt doesn't allow optional
  191. X!              * arguments, so we do a check here for
  192. X!              * obsolete usage of the -p option
  193. X!              */
  194. X!             if ((argv[i][1] == 'p' || argv[i][1] == 'P') &&
  195. X!                 argv[i][2] == '\0') {
  196. X!                 fprintf(stderr, "calentool: -p/-P requires a 'd', 'w' or 'm' argument\n");
  197. X!                 exit(1);
  198. X!             }
  199. X              toolrunning = 0;
  200. X          } else if (!strcmp(argv[i], "-Wp"))
  201. X              user_pos = 1;
  202. X***************
  203. X*** 180,186
  204. X          if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "-m")
  205. X              || !strcmp(argv[i], "-P"))
  206. X              toolrunning = 0;
  207. X!         if (!strcmp(argv[i], "-Wp"))
  208. X              user_pos = 1;
  209. X      }
  210. X      if (toolrunning) {
  211. X
  212. X--- 190,196 -----
  213. X                  exit(1);
  214. X              }
  215. X              toolrunning = 0;
  216. X!         } else if (!strcmp(argv[i], "-Wp"))
  217. X              user_pos = 1;
  218. X      }
  219. X      if (toolrunning) {
  220. X***************
  221. X*** 195,201
  222. X                  0);
  223. X      }
  224. X  
  225. X!     while ((flag = getopt(argc, argv, "57bd:f:im:opPrtu:zH:h:w")) != EOF)
  226. X          switch (flag) {   
  227. X              case 'f':    /* use this file */
  228. X              otherfile = 1;
  229. X
  230. X--- 205,211 -----
  231. X                  0);
  232. X      }
  233. X  
  234. X!     while ((flag = getopt(argc, argv, "57bd:f:im:op:P:rtu:zH:h:w")) != EOF)
  235. X          switch (flag) {   
  236. X              case 'f':    /* use this file */
  237. X              otherfile = 1;
  238. X***************
  239. X*** 212,218
  240. X              
  241. X              case 'p':    /* print and exit */
  242. X              read_only = 1;
  243. X!             printit = 1;
  244. X              break;
  245. X  
  246. X              case 'P':    /* print and exit (ignore some notes) */
  247. X
  248. X--- 222,246 -----
  249. X              
  250. X              case 'p':    /* print and exit */
  251. X              read_only = 1;
  252. X!             switch (*optarg) {
  253. X!                 case 'd':
  254. X!                 case 'D':
  255. X!                     printit = PRI_DAY;
  256. X!                     break;
  257. X!                 case 'w':
  258. X!                 case 'W':
  259. X!                     printit = PRI_WEEK;
  260. X!                     break;
  261. X!                 case 'm':
  262. X!                 case 'M':
  263. X!                     printit = PRI_MONTH;
  264. X!                     break;
  265. X!                 default:
  266. X!                     fprintf(stderr, "calentool: unknown print option.", NON_FATAL);
  267. X!                     break;
  268. X!             }
  269. X!             if (!printit_dst)
  270. X!                 printit_dst = DST_STDOUT;
  271. X              break;
  272. X  
  273. X              case 'P':    /* print and exit (ignore some notes) */
  274. X***************
  275. X*** 217,223
  276. X  
  277. X              case 'P':    /* print and exit (ignore some notes) */
  278. X              read_only = 1;
  279. X!             printit = 3;
  280. X              break;
  281. X  
  282. X              case 'm':    /* mail today's appts and exit */
  283. X
  284. X--- 245,269 -----
  285. X  
  286. X              case 'P':    /* print and exit (ignore some notes) */
  287. X              read_only = 1;
  288. X!             switch (*optarg) {
  289. X!                 case 'd':
  290. X!                 case 'D':
  291. X!                     printit = PRI_DAY_XNOTES;
  292. X!                     break;
  293. X!                 case 'w':
  294. X!                 case 'W':
  295. X!                     printit = PRI_WEEK_XNOTES;
  296. X!                     break;
  297. X!                 case 'm':
  298. X!                 case 'M':
  299. X!                     printit = PRI_MONTH_XNOTES;
  300. X!                     break;
  301. X!                 default:
  302. X!                     fprintf(stderr, "calentool: unknown print option.", NON_FATAL);
  303. X!                     break;
  304. X!             }
  305. X!             if (!printit_dst)
  306. X!                 printit_dst = DST_STDOUT;
  307. X              break;
  308. X  
  309. X              case 'm':    /* mail today's appts and exit */
  310. X***************
  311. X*** 222,228
  312. X  
  313. X              case 'm':    /* mail today's appts and exit */
  314. X              read_only = 1;
  315. X!             printit = 2;
  316. X              mailto = optarg;
  317. X              break;
  318. X  
  319. X
  320. X--- 268,274 -----
  321. X  
  322. X              case 'm':    /* mail today's appts and exit */
  323. X              read_only = 1;
  324. X!             printit_dst = DST_MAIL;
  325. X              mailto = optarg;
  326. X              break;
  327. X  
  328. X***************
  329. X*** 292,298
  330. X                      holiday_s = 1;
  331. X                      break;
  332. X                  default:
  333. X!                     fprintf(stderr, "unknown holiday option (must be one of \"Aacijs\")");
  334. X                      break;
  335. X              }
  336. X              break;
  337. X
  338. X--- 338,344 -----
  339. X                      holiday_s = 1;
  340. X                      break;
  341. X                  default:
  342. X!                     fprintf(stderr, "calentool: unknown holiday option (must be one of \"Aacijs\")");
  343. X                      break;
  344. X              }
  345. X              break;
  346. X***************
  347. X*** 326,332
  348. X                      holiday_s = 2;
  349. X                      break;
  350. X                  default:
  351. X!                     fprintf(stderr, "unknown holiday option (must be one of \"Aacijs\")");
  352. X                      break;
  353. X              }
  354. X              break;
  355. X
  356. X--- 372,378 -----
  357. X                      holiday_s = 2;
  358. X                      break;
  359. X                  default:
  360. X!                     fprintf(stderr, "calentool: unknown holiday option (must be one of \"Aacijs\")");
  361. X                      break;
  362. X              }
  363. X              break;
  364. X***************
  365. X*** 333,339
  366. X  #else
  367. X              case 'h':
  368. X              case 'H':
  369. X!                 fprintf(stderr, "-h and -H options not available\n");
  370. X                  break;
  371. X  #endif
  372. X              case '?':
  373. X
  374. X--- 379,385 -----
  375. X  #else
  376. X              case 'h':
  377. X              case 'H':
  378. X!                 fprintf(stderr, "calentool: -h and -H options not available\n");
  379. X                  break;
  380. X  #endif
  381. X              case '?':
  382. X***************
  383. X*** 341,348
  384. X              fprintf(stderr, "usage: %s [options...]\nwhere <options> are:\n", progname);
  385. X              fprintf(stderr, " -f <appointment_file>\n");
  386. X              fprintf(stderr, " -r        // readonly\n");
  387. X!             fprintf(stderr, " -p        // print selected days appts and exit\n");
  388. X!             fprintf(stderr, " -P        // like -p, only don't print marked notes\n");
  389. X              fprintf(stderr, " -m <user>    // mail selected days appts to <user>\n");
  390. X              fprintf(stderr, " [-5|-7]    // 5-day or 7-day week display\n");
  391. X              fprintf(stderr, " -d <date>    // display appts for <date>\n");
  392. X
  393. X--- 387,394 -----
  394. X              fprintf(stderr, "usage: %s [options...]\nwhere <options> are:\n", progname);
  395. X              fprintf(stderr, " -f <appointment_file>\n");
  396. X              fprintf(stderr, " -r        // readonly\n");
  397. X!             fprintf(stderr, " -p <dwm>    // print selected day [d], week [w] or month [m] appts and exit\n");
  398. X!             fprintf(stderr, " -P <dwm>    // like -p, only don't print marked notes\n");
  399. X              fprintf(stderr, " -m <user>    // mail selected days appts to <user>\n");
  400. X              fprintf(stderr, " [-5|-7]    // 5-day or 7-day week display\n");
  401. X              fprintf(stderr, " -d <date>    // display appts for <date>\n");
  402. X***************
  403. X*** 382,388
  404. X      get_printer();
  405. X      
  406. X      if (printit) {
  407. X!         print_apts(printit);
  408. X          exit(0);
  409. X      }
  410. X  
  411. X
  412. X--- 428,434 -----
  413. X      get_printer();
  414. X      
  415. X      if (printit) {
  416. X!         print_apts(printit, printit_dst);
  417. X          exit(0);
  418. X      }
  419. X  
  420. X***************
  421. X*** 630,636
  422. X              close_day();
  423. X          current = today;
  424. X          err2console(TRUE);
  425. X!         get_day_appts();
  426. X          err2console(FALSE);
  427. X          day_is_open = TRUE;
  428. X          if (!new_day) {
  429. X
  430. X--- 676,682 -----
  431. X              close_day();
  432. X          current = today;
  433. X          err2console(TRUE);
  434. X!         (void)get_day_appts();
  435. X          err2console(FALSE);
  436. X          day_is_open = TRUE;
  437. X          if (!new_day) {
  438. X***************
  439. X*** 769,775
  440. X                  close_day();
  441. X              current = Save;
  442. X              err2console(TRUE);
  443. X!             get_day_appts();
  444. X              err2console(FALSE);
  445. X              day_is_open = TRUE;
  446. X          }
  447. X
  448. X--- 815,821 -----
  449. X                  close_day();
  450. X              current = Save;
  451. X              err2console(TRUE);
  452. X!             (void)get_day_appts();
  453. X              err2console(FALSE);
  454. X              day_is_open = TRUE;
  455. X          }
  456. X*** /tmp/,RCSt1a05528    Wed Jul 19 20:45:42 1989
  457. X--- ct.h    Wed Jul 19 20:26:54 1989
  458. X***************
  459. X*** 1,5
  460. X  /*
  461. X!  * $Header: ct.h,v 2.1 89/05/09 14:25:13 billr Exp $
  462. X   */
  463. X  /*
  464. X   * ct.h - header file for calentool
  465. X
  466. X--- 1,5 -----
  467. X  /*
  468. X!  * $Header: ct.h,v 2.2 89/07/19 20:26:27 billr Exp $
  469. X   */
  470. X  /*
  471. X   * ct.h - header file for calentool
  472. X***************
  473. X*** 24,30
  474. X  
  475. X  /* directory for date/event files */
  476. X  #ifndef DATELIB_DIR
  477. X! #    define DATELIB_DIR    "/usr/local/lib/calentool"
  478. X  #endif
  479. X  
  480. X  #ifndef NOPRINTER
  481. X
  482. X--- 24,30 -----
  483. X  
  484. X  /* directory for date/event files */
  485. X  #ifndef DATELIB_DIR
  486. X! #    define DATELIB_DIR    "/usr/net/lib/calentool"
  487. X  #endif
  488. X  
  489. X  #ifndef NOPRINTER
  490. X***************
  491. X*** 34,39
  492. X  #    endif
  493. X  
  494. X  /*#    define RASTER_ONLY    /* define this if no Postscript printer available */
  495. X  #endif
  496. X  
  497. X  /* define NR_WEEKDAYS for desired week display */
  498. X
  499. X--- 34,41 -----
  500. X  #    endif
  501. X  
  502. X  /*#    define RASTER_ONLY    /* define this if no Postscript printer available */
  503. X+ #ifndef PS_NOTE_FONT
  504. X+ #       define PS_NOTE_FONT     "Helvetica-Narrow"
  505. X  #endif
  506. X  #endif
  507. X  
  508. X***************
  509. X*** 35,40
  510. X  
  511. X  /*#    define RASTER_ONLY    /* define this if no Postscript printer available */
  512. X  #endif
  513. X  
  514. X  /* define NR_WEEKDAYS for desired week display */
  515. X  /* NR_WEEKDAYS        display   */
  516. X
  517. X--- 37,43 -----
  518. X  #ifndef PS_NOTE_FONT
  519. X  #       define PS_NOTE_FONT     "Helvetica-Narrow"
  520. X  #endif
  521. X+ #endif
  522. X  
  523. X  /* define NR_WEEKDAYS for desired week display */
  524. X  /* NR_WEEKDAYS        display   */
  525. X***************
  526. X*** 197,202
  527. X  #define NON_FATAL    0
  528. X  #define FATAL        1
  529. X  
  530. X  #define STD_ICON    0        /* flags for icon currently displayed */
  531. X  #define REV_ICON    1
  532. X  #define NA_ICON        2
  533. X
  534. X--- 200,206 -----
  535. X  #define NON_FATAL    0
  536. X  #define FATAL        1
  537. X  
  538. X+ /* icon identifiers */
  539. X  #define STD_ICON    0        /* flags for icon currently displayed */
  540. X  #define REV_ICON    1
  541. X  #define NA_ICON        2
  542. X***************
  543. X*** 200,205
  544. X  #define STD_ICON    0        /* flags for icon currently displayed */
  545. X  #define REV_ICON    1
  546. X  #define NA_ICON        2
  547. X  
  548. X  /* header line in appts file implies one-based entries and 99 memo flag */
  549. X  #define HEADER        "# CalenTool V2 - DO NOT REMOVE THIS LINE\n"
  550. X
  551. X--- 204,220 -----
  552. X  #define STD_ICON    0        /* flags for icon currently displayed */
  553. X  #define REV_ICON    1
  554. X  #define NA_ICON        2
  555. X+ 
  556. X+ /* arguments to print_apts() */
  557. X+ #define PRI_DAY            1
  558. X+ #define PRI_WEEK        2
  559. X+ #define PRI_MONTH        3
  560. X+ #define PRI_XNOTES        4
  561. X+ #define PRI_DAY_XNOTES        (PRI_DAY|PRI_XNOTES)
  562. X+ #define PRI_WEEK_XNOTES        (PRI_WEEK|PRI_XNOTES)
  563. X+ #define PRI_MONTH_XNOTES     (PRI_MONTH|PRI_XNOTES)
  564. X+ #define DST_STDOUT        1
  565. X+ #define DST_MAIL        2
  566. X  
  567. X  /* header line in appts file implies one-based entries and 99 memo flag */
  568. X  #define HEADER        "# CalenTool V2 - DO NOT REMOVE THIS LINE\n"
  569. X*** /tmp/,RCSt1a05533    Wed Jul 19 20:45:45 1989
  570. X--- datelib.c    Wed Jul 19 20:35:04 1989
  571. X***************
  572. X*** 1,5
  573. X  /*
  574. X!  * $Header: datelib.c,v 2.1 89/05/09 14:18:52 billr Exp $
  575. X   *
  576. X   * datelib.c - Calendar (date) computation library
  577. X   *
  578. X
  579. X--- 1,5 -----
  580. X  /*
  581. X!  * $Header: datelib.c,v 2.2 89/07/19 20:34:23 billr Exp $
  582. X   *
  583. X   * datelib.c - Calendar (date) computation library
  584. X   *
  585. X***************
  586. X*** 1026,1033
  587. X   * and that it exhibits the eccentricity of always computing the day
  588. X   * relative to March, so that April 2 appears as March 33, which is also
  589. X   * corrected below.
  590. X!  * This formula is probably only accurate for years up to and including
  591. X!  * 2000 (tested); I know that it fails for 2011.
  592. X   */
  593. X  double
  594. X  passover(year, jyear)
  595. X
  596. X--- 1026,1034 -----
  597. X   * and that it exhibits the eccentricity of always computing the day
  598. X   * relative to March, so that April 2 appears as March 33, which is also
  599. X   * corrected below.
  600. X!  *
  601. X!  * Floating point implementation by R.P.C. Rodgers; integer implementation
  602. X!  * (for faster calculation) by Amos Shapir (amos@nsc.com).
  603. X   */
  604. X  double
  605. X  passover(year, jyear)
  606. X***************
  607. X*** 1033,1039
  608. X  passover(year, jyear)
  609. X      int    *jyear, year;
  610. X  {
  611. X!     double    etmp, p_day;
  612. X      int    atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp;
  613. X      int    p_month;
  614. X  
  615. X
  616. X--- 1034,1040 -----
  617. X  passover(year, jyear)
  618. X      int    *jyear, year;
  619. X  {
  620. X!     int    etmp, p_day;
  621. X      int    atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp;
  622. X      int    p_month;
  623. X  
  624. X***************
  625. X*** 1041,1050
  626. X      *jyear = atmp;
  627. X      btmp = (12 * atmp + 17) % 19;
  628. X      ctmp = atmp % 4;
  629. X!     etmp = (1.55424180 * btmp) - (0.003177794 * atmp)
  630. X!         + (ctmp / 4) + 32.04409316;
  631. X!     dtmp = etmp;
  632. X!     etmp = etmp - dtmp;
  633. X          /* day_of_week is not to be confused with the
  634. X           value returned by the day_of_week routine; here, Sunday = 1 */
  635. X      day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
  636. X
  637. X--- 1042,1051 -----
  638. X      *jyear = atmp;
  639. X      btmp = (12 * atmp + 17) % 19;
  640. X      ctmp = atmp % 4;
  641. X!     etmp = (765433 * btmp) - (1565 * atmp)
  642. X!         + (ctmp * 123120) + 15781075;
  643. X!     dtmp = etmp / 492480;
  644. X!     etmp %= 492480;
  645. X          /* day_of_week is not to be confused with the
  646. X           value returned by the day_of_week routine; here, Sunday = 1 */
  647. X      day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
  648. X***************
  649. X*** 1048,1057
  650. X          /* day_of_week is not to be confused with the
  651. X           value returned by the day_of_week routine; here, Sunday = 1 */
  652. X      day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
  653. X!     if (day_of_week == 0 && btmp > 11 && etmp >= 0.89772377)
  654. X!         p_day = dtmp + 1.0;
  655. X!     else if (day_of_week == 1 && btmp > 6 && etmp >= 0.63287037)
  656. X!         p_day = dtmp + 2.0;
  657. X      else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
  658. X          p_day = dtmp + 1.0;
  659. X      else {
  660. X
  661. X--- 1049,1058 -----
  662. X          /* day_of_week is not to be confused with the
  663. X           value returned by the day_of_week routine; here, Sunday = 1 */
  664. X      day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
  665. X!     if (day_of_week == 0 && btmp > 11 && etmp >= 311676)
  666. X!         p_day = dtmp + 1;
  667. X!     else if (day_of_week == 1 && btmp > 6 && etmp >= 311676)
  668. X!         p_day = dtmp + 2;
  669. X      else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
  670. X          p_day = dtmp + 1;
  671. X      else {
  672. X***************
  673. X*** 1053,1059
  674. X      else if (day_of_week == 1 && btmp > 6 && etmp >= 0.63287037)
  675. X          p_day = dtmp + 2.0;
  676. X      else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
  677. X!         p_day = dtmp + 1.0;
  678. X      else {
  679. X          p_day = dtmp;
  680. X      }
  681. X
  682. X--- 1054,1060 -----
  683. X      else if (day_of_week == 1 && btmp > 6 && etmp >= 311676)
  684. X          p_day = dtmp + 2;
  685. X      else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
  686. X!         p_day = dtmp + 1;
  687. X      else {
  688. X          p_day = dtmp;
  689. X      }
  690. X*** /tmp/,RCSt1a06079    Tue Sep 19 06:02:26 1989
  691. X--- devent.c    Tue Sep 19 05:59:20 1989
  692. X***************
  693. X*** 1,5
  694. X  /*
  695. X!  * $Header: devent.c,v 2.1 89/05/09 14:18:59 billr Exp $
  696. X   */
  697. X  /*
  698. X   * devent.c
  699. X
  700. X--- 1,5 -----
  701. X  /*
  702. X!  * $Header: devent.c,v 2.5 89/09/19 05:58:58 billr Exp $
  703. X   */
  704. X  /*
  705. X   * devent.c
  706. X***************
  707. X*** 68,74
  708. X      event = canvas_window_event(canvas, event);
  709. X          x = event_x(event);
  710. X          y = event_y(event);
  711. X-     /*fix_event(canvas, event);    /* check for LOC_RGNENTER */
  712. X      if (event_id(event) == LOC_RGNEXIT && old_slot >= 0) {
  713. X          /* erase text cursor */
  714. X          text_cursor(old_slot);
  715. X
  716. X--- 68,73 -----
  717. X      event = canvas_window_event(canvas, event);
  718. X          x = event_x(event);
  719. X          y = event_y(event);
  720. X      if (event_id(event) == LOC_RGNEXIT && old_slot >= 0) {
  721. X          /* erase text cursor */
  722. X          text_cursor(old_slot);
  723. X***************
  724. X*** 202,208
  725. X              }
  726. X          }
  727. X          expecting = 0;
  728. X!         } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
  729. X          /* Process a MB click. */
  730. X          if (box_index >= n_tslots)
  731. X              /* don't flow into notes section */
  732. X
  733. X--- 201,207 -----
  734. X              }
  735. X          }
  736. X          expecting = 0;
  737. X!     } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
  738. X          /* Process a MB click. */
  739. X          if (event_is_down(event)) {
  740. X              /* try to start dragging from here */
  741. X***************
  742. X*** 204,212
  743. X          expecting = 0;
  744. X          } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
  745. X          /* Process a MB click. */
  746. X-         if (box_index >= n_tslots)
  747. X-             /* don't flow into notes section */
  748. X-             box_index = n_tslots - 1;
  749. X          if (event_is_down(event)) {
  750. X              /* try to start dragging from here */
  751. X              if (slots[box_index].active != ACTIVE) {
  752. X
  753. X--- 203,208 -----
  754. X          expecting = 0;
  755. X      } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
  756. X          /* Process a MB click. */
  757. X          if (event_is_down(event)) {
  758. X              /* try to start dragging from here */
  759. X              if (slots[box_index].active != ACTIVE || box_index >= n_tslots) {
  760. X***************
  761. X*** 209,215
  762. X              box_index = n_tslots - 1;
  763. X          if (event_is_down(event)) {
  764. X              /* try to start dragging from here */
  765. X!             if (slots[box_index].active != ACTIVE) {
  766. X                  start_arrow_box = -1;
  767. X                  return(0);
  768. X              }
  769. X
  770. X--- 205,212 -----
  771. X          /* Process a MB click. */
  772. X          if (event_is_down(event)) {
  773. X              /* try to start dragging from here */
  774. X!             if (slots[box_index].active != ACTIVE || box_index >= n_tslots) {
  775. X!                 /* not allowed in notes slots, either */
  776. X                  start_arrow_box = -1;
  777. X                  return(0);
  778. X              }
  779. X***************
  780. X*** 223,232
  781. X              }
  782. X              prev_box = start_arrow_box = box_index;
  783. X          } else {
  784. X!             /* end of dragging => end of arrow */
  785. X!             if (box_index < start_arrow_box || start_arrow_box == -1) {
  786. X!                 start_arrow_box = -1;
  787. X!                 return(0);
  788. X              }
  789. X              if (box_index > start_arrow_box) {
  790. X                  i = start_arrow_box;
  791. X
  792. X--- 220,233 -----
  793. X              }
  794. X              prev_box = start_arrow_box = box_index;
  795. X          } else {
  796. X!             if (box_index >= n_tslots) {
  797. X!                 /* mouse currently in notes section */
  798. X!                 if (start_arrow_box == -1)
  799. X!                     /* started in notes section, too */
  800. X!                     return(0);
  801. X!                 else
  802. X!                     /* truncate at start of notes section */
  803. X!                     box_index = n_tslots - 1;
  804. X              }
  805. X              /* end of dragging => end of arrow */
  806. X              if (box_index > start_arrow_box && start_arrow_box != -1) {
  807. X***************
  808. X*** 228,234
  809. X                  start_arrow_box = -1;
  810. X                  return(0);
  811. X              }
  812. X!             if (box_index > start_arrow_box) {
  813. X                  i = start_arrow_box;
  814. X                  slots[i].cur_appt->arrows = box_index - start_arrow_box;
  815. X                  while (++i < box_index) {
  816. X
  817. X--- 229,236 -----
  818. X                      /* truncate at start of notes section */
  819. X                      box_index = n_tslots - 1;
  820. X              }
  821. X!             /* end of dragging => end of arrow */
  822. X!             if (box_index > start_arrow_box && start_arrow_box != -1) {
  823. X                  i = start_arrow_box;
  824. X                  slots[i].cur_appt->arrows = box_index - start_arrow_box;
  825. X                  while (++i < box_index) {
  826. X***************
  827. X*** 337,343
  828. X                  }
  829. X          }
  830. X          i = (int) menu_show(day_sel_menu, canvas, event, 0);
  831. X!         if (i > 0)
  832. X              switch (i) {
  833. X                  case MDELETE:
  834. X                      delete_appt(box_index, canvas);
  835. X
  836. X--- 339,345 -----
  837. X                  }
  838. X          }
  839. X          i = (int) menu_show(day_sel_menu, canvas, event, 0);
  840. X!         if (i > 0) {
  841. X              switch (i) {
  842. X                  case MDELETE:
  843. X                      delete_appt(box_index, canvas);
  844. X***************
  845. X*** 358,366
  846. X                      undelete_appt(box_index);
  847. X                      break;
  848. X              }
  849. X!         if (new_entry) {
  850. X!             close_day();
  851. X!             draw_day();    /* redraw display */
  852. X          }
  853. X      } else
  854. X          window_default_event_proc(canvas, event, 0);
  855. X
  856. X--- 360,369 -----
  857. X                      undelete_appt(box_index);
  858. X                      break;
  859. X              }
  860. X!             if (new_entry) {
  861. X!                 close_day();
  862. X!                 draw_day();    /* redraw display */
  863. X!             }
  864. X          }
  865. X      } else
  866. X          window_default_event_proc(canvas, event, 0);
  867. X***************
  868. X*** 393,402
  869. X      int    strl, x;
  870. X  
  871. X      strl = strlen(&slots[slotno].cur_appt->str[slots[slotno].cur_appt->sindex]);
  872. X!     if (strl > (day_message_size-1)) {
  873. X!         pw_write(main_pixwin, slots[slotno].slot_pos.right, slots[slotno].slot_pos.bottom-4,
  874. X!           8, 8, PIX_SRC^PIX_DST, &tri_right_pr, 0, 0);
  875. X!     } else {
  876. X          x = slots[slotno].slot_pos.left + strl * font->pf_defaultsize.x;
  877. X          pw_write(main_pixwin, x, slots[slotno].slot_pos.bottom-4,
  878. X            16, 16, PIX_SRC^PIX_DST, &tri_up_pr, 0, 0);
  879. X
  880. X--- 396,402 -----
  881. X      int    strl, x;
  882. X  
  883. X      strl = strlen(&slots[slotno].cur_appt->str[slots[slotno].cur_appt->sindex]);
  884. X!     if (strl <= (day_message_size-1)) {
  885. X          x = slots[slotno].slot_pos.left + strl * font->pf_defaultsize.x;
  886. X          pw_write(main_pixwin, x, slots[slotno].slot_pos.bottom-4,
  887. X            16, 16, PIX_SRC^PIX_DST, &tri_up_pr, 0, 0);
  888. X***************
  889. X*** 829,836
  890. X      /* run through the list to see if there are any deleted */
  891. X      for (aptr=slots[bi].first; aptr; aptr=aptr->next)
  892. X          if (aptr->flags & DELETED) {
  893. X!             found = 1;
  894. X!             break;
  895. X          }
  896. X      /* now see if the current one matches */
  897. X      if (found && !strcmp(aptr->str, slots[bi].cur_appt->str))
  898. X
  899. X--- 829,837 -----
  900. X      /* run through the list to see if there are any deleted */
  901. X      for (aptr=slots[bi].first; aptr; aptr=aptr->next)
  902. X          if (aptr->flags & DELETED) {
  903. X!             /* now see if the current one matches */
  904. X!             if (!strcmp(aptr->str, slots[bi].cur_appt->str))
  905. X!                 return(1);
  906. X          }
  907. X      
  908. X      return(0);
  909. X***************
  910. X*** 832,840
  911. X              found = 1;
  912. X              break;
  913. X          }
  914. X-     /* now see if the current one matches */
  915. X-     if (found && !strcmp(aptr->str, slots[bi].cur_appt->str))
  916. X-         return(1);
  917. X      
  918. X      return(0);
  919. X  }
  920. X
  921. X--- 833,838 -----
  922. X              if (!strcmp(aptr->str, slots[bi].cur_appt->str))
  923. X                  return(1);
  924. X          }
  925. X      
  926. X      return(0);
  927. X  }
  928. X*** /tmp/,RCSt1a05543    Wed Jul 19 20:45:55 1989
  929. X--- dpaint.c    Wed Jul 19 20:27:58 1989
  930. X***************
  931. X*** 1,5
  932. X  /*
  933. X!  * $Header: dpaint.c,v 2.2 89/05/10 10:06:20 billr Exp $
  934. X   */
  935. X  /*
  936. X   * dpaint.c
  937. X
  938. X--- 1,5 -----
  939. X  /*
  940. X!  * $Header: dpaint.c,v 2.3 89/07/19 20:27:45 billr Exp $
  941. X   */
  942. X  /*
  943. X   * dpaint.c
  944. X***************
  945. X*** 77,82
  946. X   */
  947. X  draw_day1()
  948. X  {
  949. X      lock_cursors();
  950. X      fix_current_day();
  951. X      working(TRUE);
  952. X
  953. X--- 77,84 -----
  954. X   */
  955. X  draw_day1()
  956. X  {
  957. X+     int i;
  958. X+ 
  959. X      lock_cursors();
  960. X      fix_current_day();
  961. X      working(TRUE);
  962. X***************
  963. X*** 83,89
  964. X      pw_batch_on(main_pixwin);
  965. X      draw_day_outline();
  966. X      pw_batch_off(main_pixwin);
  967. X!     get_day_appts();
  968. X      working(FALSE);
  969. X      pw_batch_on(main_pixwin);
  970. X      draw_day_appts();
  971. X
  972. X--- 85,91 -----
  973. X      pw_batch_on(main_pixwin);
  974. X      draw_day_outline();
  975. X      pw_batch_off(main_pixwin);
  976. X!     i = get_day_appts();
  977. X      working(FALSE);
  978. X      if (i) {
  979. X          pw_batch_on(main_pixwin);
  980. X***************
  981. X*** 85,93
  982. X      pw_batch_off(main_pixwin);
  983. X      get_day_appts();
  984. X      working(FALSE);
  985. X!     pw_batch_on(main_pixwin);
  986. X!     draw_day_appts();
  987. X!     pw_batch_off(main_pixwin);
  988. X      day_is_open = TRUE;
  989. X      unlock_cursors();
  990. X  }
  991. X
  992. X--- 87,97 -----
  993. X      pw_batch_off(main_pixwin);
  994. X      i = get_day_appts();
  995. X      working(FALSE);
  996. X!     if (i) {
  997. X!         pw_batch_on(main_pixwin);
  998. X!         draw_day_appts();
  999. X!         pw_batch_off(main_pixwin);
  1000. X!     }
  1001. X      day_is_open = TRUE;
  1002. X      unlock_cursors();
  1003. X  }
  1004. X***************
  1005. X*** 172,177
  1006. X   * with all the lines from the ".appointments" file 
  1007. X   * which do not pertain to the current day.
  1008. X   */
  1009. X  get_day_appts()
  1010. X  {
  1011. X      FILE *apts, *temp_apts;
  1012. X
  1013. X--- 176,182 -----
  1014. X   * with all the lines from the ".appointments" file 
  1015. X   * which do not pertain to the current day.
  1016. X   */
  1017. X+ int
  1018. X  get_day_appts()
  1019. X  {
  1020. X      FILE *apts, *temp_apts;
  1021. X***************
  1022. X*** 176,182
  1023. X  {
  1024. X      FILE *apts, *temp_apts;
  1025. X      int slotno, n_arrows, i;
  1026. X!     int read_stat;
  1027. X      struct appt_entry appt;
  1028. X      struct appt_entry *nappt, *aptr;
  1029. X      char buf[MAX_STRLEN], *sptr;
  1030. X
  1031. X--- 181,187 -----
  1032. X  {
  1033. X      FILE *apts, *temp_apts;
  1034. X      int slotno, n_arrows, i;
  1035. X!     int read_stat, some_appt = 0;
  1036. X      struct appt_entry appt;
  1037. X      struct appt_entry *nappt, *aptr;
  1038. X      char buf[MAX_STRLEN], *sptr;
  1039. X***************
  1040. X*** 329,334
  1041. X          fclose(apts);             
  1042. X      current = First;
  1043. X      fix_current_day();
  1044. X  }
  1045. X  
  1046. X  
  1047. X
  1048. X--- 334,351 -----
  1049. X          fclose(apts);             
  1050. X      current = First;
  1051. X      fix_current_day();
  1052. X+     /* now check to see if there is anything happening this day */
  1053. X+     if (findex)
  1054. X+         some_appt = 1;
  1055. X+     else {
  1056. X+         for (i=0; i<N_SLOTS; i++) {
  1057. X+             if (slots[i].count > 0) {
  1058. X+                 some_appt = 1;
  1059. X+                 break;
  1060. X+             }
  1061. X+         }
  1062. X+     }
  1063. X+     return(some_appt);
  1064. X  }
  1065. X  
  1066. X  
  1067. X*** /tmp/,RCSt1a05550    Wed Jul 19 20:45:59 1989
  1068. X--- init.c    Wed Jul 19 20:28:11 1989
  1069. X***************
  1070. X*** 1,5
  1071. X  /*
  1072. X!  * $Header: init.c,v 2.1 89/05/09 14:23:19 billr Exp $
  1073. X   */
  1074. X  /*
  1075. X   * init.c
  1076. X
  1077. X--- 1,5 -----
  1078. X  /*
  1079. X!  * $Header: init.c,v 2.2 89/07/19 20:27:59 billr Exp $
  1080. X   */
  1081. X  /*
  1082. X   * init.c
  1083. X***************
  1084. X*** 35,40
  1085. X  #include <suntool/menu.h>
  1086. X  #include <sunwindow/defaults.h>
  1087. X  #include <sys/file.h>
  1088. X  #include <pwd.h>
  1089. X  #include "ct.h"
  1090. X  
  1091. X
  1092. X--- 35,41 -----
  1093. X  #include <suntool/menu.h>
  1094. X  #include <sunwindow/defaults.h>
  1095. X  #include <sys/file.h>
  1096. X+ #include <sys/stat.h>
  1097. X  #include <pwd.h>
  1098. X  #include "ct.h"
  1099. X  
  1100. X***************
  1101. X*** 321,327
  1102. X      char *strcpy(), *rindex(), *getenv();
  1103. X      char *slash, *default_ptr, *envptr;
  1104. X      char buff[80];
  1105. X!     int to_slash, getpid(), fd, errflag;
  1106. X      struct passwd *pw;
  1107. X      FILE *appts;
  1108. X  
  1109. X
  1110. X--- 322,328 -----
  1111. X      char *strcpy(), *rindex(), *getenv();
  1112. X      char *slash, *default_ptr, *envptr;
  1113. X      char buff[80];
  1114. X!     int to_slash, getpid(), fd, errflag, numask;
  1115. X      struct passwd *pw;
  1116. X      struct stat statbuf;
  1117. X      FILE *appts;
  1118. X***************
  1119. X*** 323,328
  1120. X      char buff[80];
  1121. X      int to_slash, getpid(), fd, errflag;
  1122. X      struct passwd *pw;
  1123. X      FILE *appts;
  1124. X  
  1125. X      /* the tmp file */
  1126. X
  1127. X--- 324,330 -----
  1128. X      char buff[80];
  1129. X      int to_slash, getpid(), fd, errflag, numask;
  1130. X      struct passwd *pw;
  1131. X+     struct stat statbuf;
  1132. X      FILE *appts;
  1133. X  
  1134. X      /* the tmp file */
  1135. X***************
  1136. X*** 382,388
  1137. X              if ((int)window_loop(prompt_frame) == 0) {
  1138. X                  /* try to create the file */
  1139. X                  fprintf(stderr, "creating file\n");
  1140. X!                 if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0664)) <= 0) {
  1141. X                      perror(apts_pathname);
  1142. X                      errflag = 1;
  1143. X                      fprintf(stderr, "..error\n");
  1144. X
  1145. X--- 384,390 -----
  1146. X              if ((int)window_loop(prompt_frame) == 0) {
  1147. X                  /* try to create the file */
  1148. X                  fprintf(stderr, "creating file\n");
  1149. X!                 if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0644)) <= 0) {
  1150. X                      perror(apts_pathname);
  1151. X                      errflag = 1;
  1152. X                      fprintf(stderr, "..error\n");
  1153. X***************
  1154. X*** 406,412
  1155. X              fprintf(stderr, "Cannot access calendar file %s - create? ", apts_pathname);
  1156. X              fgets(buff, 80, stdin);
  1157. X              if (buff[0] == 'y' || buff[0] == 'Y') {
  1158. X!                 if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0664)) <= 0) {
  1159. X                      perror(apts_pathname);
  1160. X                      return(1);
  1161. X                  } else {
  1162. X
  1163. X--- 408,414 -----
  1164. X              fprintf(stderr, "Cannot access calendar file %s - create? ", apts_pathname);
  1165. X              fgets(buff, 80, stdin);
  1166. X              if (buff[0] == 'y' || buff[0] == 'Y') {
  1167. X!                 if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0644)) <= 0) {
  1168. X                      perror(apts_pathname);
  1169. X                      return(1);
  1170. X                  } else {
  1171. X***************
  1172. X*** 424,429
  1173. X      }
  1174. X      if (access(apts_pathname, W_OK) == -1)
  1175. X          read_only = 1;
  1176. X  
  1177. X      /* update base frame label, if the tool is running */
  1178. X      if (frame) {
  1179. X
  1180. X--- 426,439 -----
  1181. X      }
  1182. X      if (access(apts_pathname, W_OK) == -1)
  1183. X          read_only = 1;
  1184. X+     /*
  1185. X+      * set permissions on tmp file based on .appointments file
  1186. X+      * with the expception that we need at least write permission
  1187. X+      * for the owner.
  1188. X+      */
  1189. X+     (void)stat(apts_pathname, &statbuf);
  1190. X+     numask = ~statbuf.st_mode & 0077;  /* yes, this is octal 77 */
  1191. X+     (void)umask(numask);
  1192. X  
  1193. X      /* update base frame label, if the tool is running */
  1194. X      if (frame) {
  1195. X*** /tmp/,RCSt1a05560    Wed Jul 19 20:46:07 1989
  1196. X--- mpaint.c    Wed Jul 19 20:29:26 1989
  1197. X***************
  1198. X*** 1,5
  1199. X  /*
  1200. X!  * $Header: mpaint.c,v 2.1 89/05/09 14:19:29 billr Exp $
  1201. X   */
  1202. X  /*
  1203. X   * mpaint.c
  1204. X
  1205. X--- 1,5 -----
  1206. X  /*
  1207. X!  * $Header: mpaint.c,v 2.2 89/07/19 20:29:01 billr Exp $
  1208. X   */
  1209. X  /*
  1210. X   * mpaint.c
  1211. X***************
  1212. X*** 41,48
  1213. X  
  1214. X  draw_month()
  1215. X  {
  1216. X!     int start_dow, i, x, y, n_days, n_weeks;
  1217. X!     int histo[7], days_in_week;
  1218. X      int arrow_index, last_top, index;
  1219. X      char c[4], title[20], *cp;
  1220. X      int left_border, right_border, top_border, bottom_border;
  1221. X
  1222. X--- 41,48 -----
  1223. X  
  1224. X  draw_month()
  1225. X  {
  1226. X!     int start_dow, i, x, y, n_days;
  1227. X!     int days_in_week;
  1228. X      int arrow_index, last_top, index;
  1229. X      char c[4], title[20], *cp;
  1230. X      int left_border, right_border, top_border, bottom_border;
  1231. X***************
  1232. X*** 66,80
  1233. X      working(TRUE);
  1234. X      start_dow = current.tm_wday;
  1235. X      n_days = monthlength(current.tm_mon);
  1236. X!     for (i=0; i<7; i++)    /* Calculate # of full/partial weeks. */
  1237. X!         histo[i] = 0;
  1238. X!     for (i=0; i<n_days; i++)
  1239. X!         histo[(start_dow + i) % 7] += 1;
  1240. X!     n_weeks = 0;
  1241. X!     for (i=0; i<7; i++)
  1242. X!         if (histo[i] > n_weeks)
  1243. X!             n_weeks = histo[i];
  1244. X! 
  1245. X      pw_batch_on(main_pixwin);
  1246. X          rect = (Rect *) window_get(canvas, WIN_RECT);
  1247. X      /* Erase the window */
  1248. X
  1249. X--- 66,72 -----
  1250. X      working(TRUE);
  1251. X      start_dow = current.tm_wday;
  1252. X      n_days = monthlength(current.tm_mon);
  1253. X!     
  1254. X      pw_batch_on(main_pixwin);
  1255. X          rect = (Rect *) window_get(canvas, WIN_RECT);
  1256. X      /* Erase the window */
  1257. X***************
  1258. X*** 80,86
  1259. X      /* Erase the window */
  1260. X          pw_writebackground(main_pixwin,0,0,rect->r_width,rect->r_height,PIX_CLR);
  1261. X          left_border = (rect->r_width - 7*64)/2 + 32;
  1262. X!         top_border = (rect->r_height - n_weeks*64) / 2;
  1263. X          right_border = left_border + 7*64;
  1264. X           
  1265. X      sprintf(title, "%s, %d",
  1266. X
  1267. X--- 72,78 -----
  1268. X      /* Erase the window */
  1269. X          pw_writebackground(main_pixwin,0,0,rect->r_width,rect->r_height,PIX_CLR);
  1270. X          left_border = (rect->r_width - 7*64)/2 + 32;
  1271. X!         top_border = (rect->r_height - 5*64) / 2;
  1272. X          right_border = left_border + 7*64;
  1273. X           
  1274. X      sprintf(title, "%s, %d",
  1275. X*** /tmp/,RCSt1a05567    Wed Jul 19 20:46:09 1989
  1276. X--- mt2ct.c    Wed Jul 19 20:29:42 1989
  1277. X***************
  1278. X*** 1,5
  1279. X  /*
  1280. X!  * $Header: mt2ct.c,v 2.1 89/05/09 14:19:31 billr Exp $
  1281. X   */
  1282. X  /*
  1283. X   * mt2ct - convert monthtool reminder files to calentool style files
  1284. X
  1285. X--- 1,5 -----
  1286. X  /*
  1287. X!  * $Header: mt2ct.c,v 2.2 89/07/19 20:29:27 billr Exp $
  1288. X   */
  1289. X  /*
  1290. X   * mt2ct - convert monthtool reminder files to calentool style files
  1291. X***************
  1292. X*** 109,117
  1293. X              aptr->flags |= ALL_YEARS;
  1294. X          if (aptr->month == 0)
  1295. X              aptr->flags |= ALL_MONTHS;
  1296. X!         if (aptr->day == 0)
  1297. X!             aptr->flags |= ALL_DAYS;
  1298. X!         if (aptr->month == 99) {
  1299. X              /* weekly reminder */
  1300. X              aptr->flags |= ALL_MONTHS;
  1301. X              aptr->flags |= Setday(aptr->day-1);
  1302. X
  1303. X--- 109,115 -----
  1304. X              aptr->flags |= ALL_YEARS;
  1305. X          if (aptr->month == 0)
  1306. X              aptr->flags |= ALL_MONTHS;
  1307. X!         else if (aptr->month == 99) {
  1308. X              /* weekly reminder */
  1309. X              aptr->flags |= ALL_MONTHS;
  1310. X              aptr->flags |= Setday(aptr->day-1);
  1311. X***************
  1312. X*** 115,121
  1313. X              /* weekly reminder */
  1314. X              aptr->flags |= ALL_MONTHS;
  1315. X              aptr->flags |= Setday(aptr->day-1);
  1316. X!         }
  1317. X          aptr->next = (struct appt_entry *)malloc(sizeof(struct appt_entry));
  1318. X          if (aptr->next == NULL) {
  1319. X              fprintf(stderr, "out of memory\n");
  1320. X
  1321. X--- 113,122 -----
  1322. X              /* weekly reminder */
  1323. X              aptr->flags |= ALL_MONTHS;
  1324. X              aptr->flags |= Setday(aptr->day-1);
  1325. X!         } else
  1326. X!             --aptr->month;
  1327. X!         if (aptr->day == 0)
  1328. X!             aptr->flags |= ALL_DAYS;
  1329. X          aptr->next = (struct appt_entry *)malloc(sizeof(struct appt_entry));
  1330. X          if (aptr->next == NULL) {
  1331. X              fprintf(stderr, "out of memory\n");
  1332. X*** /tmp/,RCSt1a06103    Tue Sep 19 06:06:51 1989
  1333. X--- calentool.1    Tue Sep 19 06:06:30 1989
  1334. X***************
  1335. X*** 1,4
  1336. X! .\" $Header: calentool.1,v 2.2 89/05/16 16:38:22 billr Exp $
  1337. X  .\"
  1338. X  .TH CALENTOOL 1 "15 May 1989"
  1339. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  1340. X
  1341. X--- 1,4 -----
  1342. X! .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
  1343. X  .\"
  1344. X  .TH CALENTOOL 1 "14 September 1989"
  1345. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  1346. X***************
  1347. X*** 1,6
  1348. X  .\" $Header: calentool.1,v 2.2 89/05/16 16:38:22 billr Exp $
  1349. X  .\"
  1350. X! .TH CALENTOOL 1 "15 May 1989"
  1351. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  1352. X  .SH NAME
  1353. X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
  1354. X
  1355. X--- 1,6 -----
  1356. X  .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
  1357. X  .\"
  1358. X! .TH CALENTOOL 1 "14 September 1989"
  1359. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  1360. X  .SH NAME
  1361. X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
  1362. X***************
  1363. X*** 7,13
  1364. X  .SH SYNOPSIS
  1365. X  .B calentool
  1366. X  [
  1367. X! .B -b
  1368. X  ]
  1369. X  [
  1370. X  .B -d
  1371. X
  1372. X--- 7,13 -----
  1373. X  .SH SYNOPSIS
  1374. X  .B calentool
  1375. X  [
  1376. X! .B \-b
  1377. X  ]
  1378. X  [
  1379. X  .B \-d
  1380. X***************
  1381. X*** 10,16
  1382. X  .B -b
  1383. X  ]
  1384. X  [
  1385. X! .B -d
  1386. X  .I date
  1387. X  ]
  1388. X  [
  1389. X
  1390. X--- 10,16 -----
  1391. X  .B \-b
  1392. X  ]
  1393. X  [
  1394. X! .B \-d
  1395. X  .I date
  1396. X  ]
  1397. X  [
  1398. X***************
  1399. X*** 14,20
  1400. X  .I date
  1401. X  ]
  1402. X  [
  1403. X! .B -f
  1404. X  .I apptsfile
  1405. X  ]
  1406. X  [
  1407. X
  1408. X--- 14,20 -----
  1409. X  .I date
  1410. X  ]
  1411. X  [
  1412. X! .B \-f
  1413. X  .I apptsfile
  1414. X  ]
  1415. X  [
  1416. X***************
  1417. X*** 18,24
  1418. X  .I apptsfile
  1419. X  ]
  1420. X  [
  1421. X! .B -h
  1422. X  [
  1423. X  .I A a c i l j s
  1424. X  ]]
  1425. X
  1426. X--- 18,24 -----
  1427. X  .I apptsfile
  1428. X  ]
  1429. X  [
  1430. X! .B \-h
  1431. X  [
  1432. X  .I A a c i l j s
  1433. X  ]]
  1434. X***************
  1435. X*** 23,29
  1436. X  .I A a c i l j s
  1437. X  ]]
  1438. X  [
  1439. X! .B -H
  1440. X  [
  1441. X  .I A a c i l j s
  1442. X  ]]
  1443. X
  1444. X--- 23,29 -----
  1445. X  .I A a c i l j s
  1446. X  ]]
  1447. X  [
  1448. X! .B \-H
  1449. X  [
  1450. X  .I A a c i l j s
  1451. X  ]]
  1452. X***************
  1453. X*** 28,34
  1454. X  .I A a c i l j s
  1455. X  ]]
  1456. X  [
  1457. X! .B -i
  1458. X  ]
  1459. X  [
  1460. X  .B -m
  1461. X
  1462. X--- 28,34 -----
  1463. X  .I A a c i l j s
  1464. X  ]]
  1465. X  [
  1466. X! .B \-i
  1467. X  ]
  1468. X  [
  1469. X  .B \-m
  1470. X***************
  1471. X*** 31,37
  1472. X  .B -i
  1473. X  ]
  1474. X  [
  1475. X! .B -m
  1476. X  .I userid
  1477. X  ]
  1478. X  [
  1479. X
  1480. X--- 31,37 -----
  1481. X  .B \-i
  1482. X  ]
  1483. X  [
  1484. X! .B \-m
  1485. X  .I userid
  1486. X  ]
  1487. X  [
  1488. X***************
  1489. X*** 35,41
  1490. X  .I userid
  1491. X  ]
  1492. X  [
  1493. X! .B -o
  1494. X  ]
  1495. X  [
  1496. X  .B -p
  1497. X
  1498. X--- 35,41 -----
  1499. X  .I userid
  1500. X  ]
  1501. X  [
  1502. X! .B \-o
  1503. X  ]
  1504. X  [
  1505. X  .B \-p
  1506. X***************
  1507. X*** 38,45
  1508. X  .B -o
  1509. X  ]
  1510. X  [
  1511. X! .B -p
  1512. X! ]
  1513. X  [
  1514. X  .B -P
  1515. X  ]
  1516. X
  1517. X--- 38,44 -----
  1518. X  .B \-o
  1519. X  ]
  1520. X  [
  1521. X! .B \-p
  1522. X  [
  1523. X  .I d w m
  1524. X  ]]
  1525. X***************
  1526. X*** 41,48
  1527. X  .B -p
  1528. X  ]
  1529. X  [
  1530. X! .B -P
  1531. X! ]
  1532. X  [
  1533. X  .B -r
  1534. X  ]
  1535. X
  1536. X--- 40,47 -----
  1537. X  [
  1538. X  .B \-p
  1539. X  [
  1540. X! .I d w m
  1541. X! ]]
  1542. X  [
  1543. X  .B \-P
  1544. X  [
  1545. X***************
  1546. X*** 44,50
  1547. X  .B -P
  1548. X  ]
  1549. X  [
  1550. X! .B -r
  1551. X  ]
  1552. X  [
  1553. X  .B -t
  1554. X
  1555. X--- 43,54 -----
  1556. X  .I d w m
  1557. X  ]]
  1558. X  [
  1559. X! .B \-P
  1560. X! [
  1561. X! .I d w m
  1562. X! ]]
  1563. X! [
  1564. X! .B \-r
  1565. X  ]
  1566. X  [
  1567. X  .B \-t
  1568. X***************
  1569. X*** 47,53
  1570. X  .B -r
  1571. X  ]
  1572. X  [
  1573. X! .B -t
  1574. X  ]
  1575. X  [
  1576. X  .B -u
  1577. X
  1578. X--- 51,57 -----
  1579. X  .B \-r
  1580. X  ]
  1581. X  [
  1582. X! .B \-t
  1583. X  ]
  1584. X  [
  1585. X  .B \-u
  1586. X***************
  1587. X*** 50,56
  1588. X  .B -t
  1589. X  ]
  1590. X  [
  1591. X! .B -u
  1592. X  .I int
  1593. X  ]
  1594. X  [
  1595. X
  1596. X--- 54,60 -----
  1597. X  .B \-t
  1598. X  ]
  1599. X  [
  1600. X! .B \-u
  1601. X  .I int
  1602. X  ]
  1603. X  [
  1604. X***************
  1605. X*** 54,60
  1606. X  .I int
  1607. X  ]
  1608. X  [
  1609. X! .B -w
  1610. X  ]
  1611. X  [
  1612. X  .B -z
  1613. X
  1614. X--- 58,64 -----
  1615. X  .I int
  1616. X  ]
  1617. X  [
  1618. X! .B \-w
  1619. X  ]
  1620. X  [
  1621. X  .B \-z
  1622. X***************
  1623. X*** 57,63
  1624. X  .B -w
  1625. X  ]
  1626. X  [
  1627. X! .B -z
  1628. X  ]
  1629. X  [
  1630. X  .B -5
  1631. X
  1632. X--- 61,67 -----
  1633. X  .B \-w
  1634. X  ]
  1635. X  [
  1636. X! .B \-z
  1637. X  ]
  1638. X  [
  1639. X  .B \-5
  1640. X***************
  1641. X*** 60,66
  1642. X  .B -z
  1643. X  ]
  1644. X  [
  1645. X! .B -5
  1646. X  ]
  1647. X  [
  1648. X  .B -7
  1649. X
  1650. X--- 64,70 -----
  1651. X  .B \-z
  1652. X  ]
  1653. X  [
  1654. X! .B \-5
  1655. X  ]
  1656. X  [
  1657. X  .B \-7
  1658. X***************
  1659. X*** 63,69
  1660. X  .B -5
  1661. X  ]
  1662. X  [
  1663. X! .B -7
  1664. X  ]
  1665. X  [
  1666. X  .I window options
  1667. X
  1668. X--- 67,73 -----
  1669. X  .B \-5
  1670. X  ]
  1671. X  [
  1672. X! .B \-7
  1673. X  ]
  1674. X  [
  1675. X  .I suntools options
  1676. X***************
  1677. X*** 66,72
  1678. X  .B -7
  1679. X  ]
  1680. X  [
  1681. X! .I window options
  1682. X  ]
  1683. X  .SH DESCRIPTION
  1684. X  .I Calentool
  1685. X
  1686. X--- 70,76 -----
  1687. X  .B \-7
  1688. X  ]
  1689. X  [
  1690. X! .I suntools options
  1691. X  ]
  1692. X  .SH DESCRIPTION
  1693. X  .I Calentool
  1694. X***************
  1695. X*** 120,126
  1696. X  .I suntools
  1697. X  command line options at the end of the command line.
  1698. X  .TP 15
  1699. X! .B -b
  1700. X  When an appointment is pending, a bell character (along with the appointment
  1701. X  message) is sent to the console; only one reminder is sent for each
  1702. X  appointment.  Also, place a copy of the appointment text in the file
  1703. X
  1704. X--- 124,130 -----
  1705. X  .I suntools
  1706. X  command line options at the end of the command line.
  1707. X  .TP 15
  1708. X! .B \-b
  1709. X  When an appointment is pending, a bell character (along with the appointment
  1710. X  message) is sent to the console; only one reminder is sent for each
  1711. X  appointment.  Also, place a copy of the appointment text in the file
  1712. X***************
  1713. X*** 160,166
  1714. X  described by a particular appointments file should have write permission for
  1715. X  that file.
  1716. X  .TP
  1717. X! .BI \-h char
  1718. X  Compute and display holidays which do not fall on set dates of the Gregorian
  1719. X  calendar.  Notes appear in the day and week displays, and marks appear in
  1720. X  the month and year displays.  This option is followed by a single character
  1721. X
  1722. X--- 164,170 -----
  1723. X  described by a particular appointments file should have write permission for
  1724. X  that file.
  1725. X  .TP
  1726. X! .BI \-h " char"
  1727. X  Compute and display holidays which do not fall on set dates of the Gregorian
  1728. X  calendar.  Notes appear in the day and week displays, and marks appear in
  1729. X  the month and year displays.  This option is followed by a single character
  1730. X***************
  1731. X*** 199,205
  1732. X  US Secular holidays.
  1733. X  .RE
  1734. X  .TP
  1735. X! .BI \-H char
  1736. X  Identical to the
  1737. X  .B \-h
  1738. X  option, except that computed dates are displayed only in the day and week
  1739. X
  1740. X--- 203,209 -----
  1741. X  US Secular holidays.
  1742. X  .RE
  1743. X  .TP
  1744. X! .BI \-H " char"
  1745. X  Identical to the
  1746. X  .B \-h
  1747. X  option, except that computed dates are displayed only in the day and week
  1748. X***************
  1749. X*** 212,218
  1750. X  .I yy
  1751. X  represents the last two digits of a past year).
  1752. X  .TP
  1753. X! .BI \-m \ userid
  1754. X  Send mail listing todays appointments to the user specified by
  1755. X  .I userid
  1756. X  and exit.
  1757. X
  1758. X--- 216,222 -----
  1759. X  .I yy
  1760. X  represents the last two digits of a past year).
  1761. X  .TP
  1762. X! .BI \-m " userid"
  1763. X  Send mail listing todays appointments to the user specified by
  1764. X  .I userid
  1765. X  and exit.
  1766. X***************
  1767. X*** 218,224
  1768. X  and exit.
  1769. X  This feature is useful when calentool is run from
  1770. X  .IR cron (1),
  1771. X! to send yourself mail about today's appointments.
  1772. X  (Note: this option eliminates the need for the separate program,
  1773. X  .IR calenmail (1L),
  1774. X  which was distributed with earlier releases of
  1775. X
  1776. X--- 222,229 -----
  1777. X  and exit.
  1778. X  This feature is useful when calentool is run from
  1779. X  .IR cron (1),
  1780. X! to send yourself mail about today's appointments.  No mail is
  1781. X! sent about today's appointments, if there are none.
  1782. X  (Note: this option eliminates the need for the separate program,
  1783. X  .IR calenmail (1L),
  1784. X  which was distributed with earlier releases of
  1785. X***************
  1786. X*** 232,238
  1787. X  .I yy
  1788. X  represents the last two digits of the past year).
  1789. X  .TP
  1790. X! .B -p
  1791. X  Print today's appointments and exit.  This is useful for reviewing
  1792. X  appointments from an ordinary terminal or
  1793. X  .IR shelltool (1).
  1794. X
  1795. X--- 237,243 -----
  1796. X  .I yy
  1797. X  represents the last two digits of the past year).
  1798. X  .TP
  1799. X! .BI \-p char
  1800. X  Print today's appointments and exit.  This is useful for reviewing
  1801. X  appointments from an ordinary terminal or
  1802. X  .IR shelltool "(1)."
  1803. X***************
  1804. X*** 235,241
  1805. X  .B -p
  1806. X  Print today's appointments and exit.  This is useful for reviewing
  1807. X  appointments from an ordinary terminal or
  1808. X! .IR shelltool (1).
  1809. X  .TP
  1810. X  .B -P
  1811. X  Print today's appointments and exit, ignoring notes which are not to mark
  1812. X
  1813. X--- 240,252 -----
  1814. X  .BI \-p char
  1815. X  Print today's appointments and exit.  This is useful for reviewing
  1816. X  appointments from an ordinary terminal or
  1817. X! .IR shelltool "(1)."
  1818. X! The
  1819. X! .I d, w, m
  1820. X! modifiers select a printout of the current day, week or month, respectively.
  1821. X! The day and week printouts are straight ASCII; the month printout is in
  1822. X! \*(Ps.  No printout is provide of the current days appointments, if there
  1823. X! are none.
  1824. X  .TP
  1825. X  .BI \-P char
  1826. X  Print today's appointments and exit, ignoring notes which are not to mark
  1827. X***************
  1828. X*** 237,243
  1829. X  appointments from an ordinary terminal or
  1830. X  .IR shelltool (1).
  1831. X  .TP
  1832. X! .B -P
  1833. X  Print today's appointments and exit, ignoring notes which are not to mark
  1834. X  the month or year displays.  This is useful for suppressing trivia when
  1835. X  reviewing appointments from an ordinary terminal or
  1836. X
  1837. X--- 248,254 -----
  1838. X  \*(Ps.  No printout is provide of the current days appointments, if there
  1839. X  are none.
  1840. X  .TP
  1841. X! .BI \-P char
  1842. X  Print today's appointments and exit, ignoring notes which are not to mark
  1843. X  the month or year displays.  This is useful for suppressing trivia when
  1844. X  reviewing appointments from an ordinary terminal or
  1845. X***************
  1846. X*** 241,247
  1847. X  Print today's appointments and exit, ignoring notes which are not to mark
  1848. X  the month or year displays.  This is useful for suppressing trivia when
  1849. X  reviewing appointments from an ordinary terminal or
  1850. X! .IR shelltool (1).
  1851. X  .TP
  1852. X  .B -r
  1853. X  Open the calendar tool in read-only mode.
  1854. X
  1855. X--- 252,264 -----
  1856. X  Print today's appointments and exit, ignoring notes which are not to mark
  1857. X  the month or year displays.  This is useful for suppressing trivia when
  1858. X  reviewing appointments from an ordinary terminal or
  1859. X! .IR shelltool "(1)."
  1860. X! The
  1861. X! .I d, w, m
  1862. X! modifiers select a printout of the current day, week or month, respectively.
  1863. X! The day and week printouts are straight ASCII; the month printout is in
  1864. X! \*(Ps.  No printout is provide of the current days appointments, if there
  1865. X! are none.
  1866. X  .TP
  1867. X  .B \-r
  1868. X  Open the calendar tool in read-only mode.
  1869. X***************
  1870. X*** 243,249
  1871. X  reviewing appointments from an ordinary terminal or
  1872. X  .IR shelltool (1).
  1873. X  .TP
  1874. X! .B -r
  1875. X  Open the calendar tool in read-only mode.
  1876. X  Appointments can be edited, but no changes will be saved.
  1877. X  The tool's banner strip will contain the string "[Read Only]".
  1878. X
  1879. X--- 260,266 -----
  1880. X  \*(Ps.  No printout is provide of the current days appointments, if there
  1881. X  are none.
  1882. X  .TP
  1883. X! .B \-r
  1884. X  Open the calendar tool in read-only mode.
  1885. X  Appointments can be edited, but no changes will be saved.
  1886. X  The tool's banner strip will contain the string "[Read Only]".
  1887. X***************
  1888. X*** 252,258
  1889. X  .B -f
  1890. X  option.
  1891. X  .TP
  1892. X! .B -t
  1893. X  Display the current time below the
  1894. X  .I calentool
  1895. X  icon (no further need for
  1896. X
  1897. X--- 269,275 -----
  1898. X  .B -f
  1899. X  option.
  1900. X  .TP
  1901. X! .B \-t
  1902. X  Display the current time below the
  1903. X  .I calentool
  1904. X  icon (no further need for
  1905. X***************
  1906. X*** 258,264
  1907. X  icon (no further need for
  1908. X  .IR clocktool (1)).
  1909. X  .TP
  1910. X! .BI -u int
  1911. X  Update the time at the interval of
  1912. X  .I int
  1913. X  seconds.
  1914. X
  1915. X--- 275,281 -----
  1916. X  icon (no further need for
  1917. X  .IR clocktool (1)).
  1918. X  .TP
  1919. X! .BI \-u " int"
  1920. X  Update the time at the interval of
  1921. X  .I int
  1922. X  seconds.
  1923. X***************
  1924. X*** 263,269
  1925. X  .I int
  1926. X  seconds.
  1927. X  .TP
  1928. X! .B -w
  1929. X  Don't display the "Working!" message in the control panel during
  1930. X  lengthy operations.  The cursor still changes to an hourglass.
  1931. X  .TP
  1932. X
  1933. X--- 280,286 -----
  1934. X  .I int
  1935. X  seconds.
  1936. X  .TP
  1937. X! .B \-w
  1938. X  Don't display the "Working!" message in the control panel during
  1939. X  lengthy operations.  The cursor still changes to an hourglass.
  1940. X  .TP
  1941. X***************
  1942. X*** 267,273
  1943. X  Don't display the "Working!" message in the control panel during
  1944. X  lengthy operations.  The cursor still changes to an hourglass.
  1945. X  .TP
  1946. X! .B -z
  1947. X  Convert appointments file used by earlier versions of
  1948. X  .I calentool
  1949. X  to the format used by the current version.  This option should be invoked only
  1950. X
  1951. X--- 284,290 -----
  1952. X  Don't display the "Working!" message in the control panel during
  1953. X  lengthy operations.  The cursor still changes to an hourglass.
  1954. X  .TP
  1955. X! .B \-z
  1956. X  Convert appointments file used by earlier versions of
  1957. X  .I calentool
  1958. X  to the format used by the current version.  This option should be invoked only
  1959. X***************
  1960. X*** 274,280
  1961. X  once, the first time an old format file is read by
  1962. X  .IR calentool .
  1963. X  .TP
  1964. X! .B -5
  1965. X  Display only five days (Monday through Friday) in the week display.  This is
  1966. X  useful if the installer has set the default display format to 7 days.
  1967. X  .TP
  1968. X
  1969. X--- 291,297 -----
  1970. X  once, the first time an old format file is read by
  1971. X  .IR calentool .
  1972. X  .TP
  1973. X! .B \-5
  1974. X  Display only five days (Monday through Friday) in the week display.  This is
  1975. X  useful if the installer has set the default display format to 7 days.
  1976. X  .TP
  1977. X***************
  1978. X*** 278,284
  1979. X  Display only five days (Monday through Friday) in the week display.  This is
  1980. X  useful if the installer has set the default display format to 7 days.
  1981. X  .TP
  1982. X! .B -7
  1983. X  Display all seven days in the week display.  This is useful if the installer
  1984. X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
  1985. X  display, allowing longer messages to be displayed.
  1986. X
  1987. X--- 295,301 -----
  1988. X  Display only five days (Monday through Friday) in the week display.  This is
  1989. X  useful if the installer has set the default display format to 7 days.
  1990. X  .TP
  1991. X! .B \-7
  1992. X  Display all seven days in the week display.  This is useful if the installer
  1993. X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
  1994. X  display, allowing longer messages to be displayed.
  1995. X***************
  1996. X*** 525,531
  1997. X  selecting
  1998. X  .BR Accept .
  1999. X  The
  2000. X! .B Save
  2001. X  button updates the current appointments file with any changes made that
  2002. X  have not yet been logged.  This is typically not an often used option.
  2003. X  .SH "FILE FORMAT"
  2004. X
  2005. X--- 542,548 -----
  2006. X  selecting
  2007. X  .BR Accept .
  2008. X  The
  2009. X! .B Update
  2010. X  button updates the current appointments file with any changes made that
  2011. X  have not yet been logged.
  2012. X  .SH "FILE FORMAT"
  2013. X***************
  2014. X*** 527,533
  2015. X  The
  2016. X  .B Save
  2017. X  button updates the current appointments file with any changes made that
  2018. X! have not yet been logged.  This is typically not an often used option.
  2019. X  .SH "FILE FORMAT"
  2020. X  Using an included file (see below) is the one instance where manual editing
  2021. X  of the
  2022. X
  2023. X--- 544,550 -----
  2024. X  The
  2025. X  .B Update
  2026. X  button updates the current appointments file with any changes made that
  2027. X! have not yet been logged.
  2028. X  .SH "FILE FORMAT"
  2029. X  Using an included file (see below) is the one instance where manual editing
  2030. X  of the
  2031. X***************
  2032. X*** 663,668
  2033. X  events
  2034. X  Historical events (major and minor)
  2035. X  .TP
  2036. X  lives
  2037. X  Biographical dates of note
  2038. X  .TP
  2039. X
  2040. X--- 680,688 -----
  2041. X  events
  2042. X  Historical events (major and minor)
  2043. X  .TP
  2044. X+ gdead
  2045. X+ Dates concerning the rock group Grateful Dead
  2046. X+ .TP
  2047. X  lives
  2048. X  Biographical dates of note
  2049. X  .TP
  2050. X***************
  2051. X*** 676,681
  2052. X  popcult
  2053. X  Special dates in Western popular culture
  2054. X  .TP
  2055. X  usa_holiday
  2056. X  Major US/Canadian holidays (holidays from work)
  2057. X  .TP
  2058. X
  2059. X--- 696,704 -----
  2060. X  popcult
  2061. X  Special dates in Western popular culture
  2062. X  .TP
  2063. X+ space
  2064. X+ Dates of note in the history of the exploration of outer space
  2065. X+ .TP
  2066. X  usa_holiday
  2067. X  Major US/Canadian holidays (holidays from work)
  2068. X  .TP
  2069. X***************
  2070. X*** 863,870
  2071. X  R. P. C. Rodgers (School of Pharmacy, University of California,
  2072. X  San Francisco, rodgers@maxwell.mmwb.ucsf.edu), performed extensive beta
  2073. X  testing, made numerous design suggestions, and contributed the holiday
  2074. X! computation library, icons, manual pages, and special dates files (which were
  2075. X! modified from earlier net postings contributed by unknown authors).
  2076. X  We thank Dr. Omar Afzal of Cornell University (Chairman of the Committee
  2077. X  for Crescent Observation) for his help in implementing the Islamic date
  2078. X  computations.
  2079. X
  2080. X--- 886,904 -----
  2081. X  R. P. C. Rodgers (School of Pharmacy, University of California,
  2082. X  San Francisco, rodgers@maxwell.mmwb.ucsf.edu), performed extensive beta
  2083. X  testing, made numerous design suggestions, and contributed the holiday
  2084. X! computation library, icons, manual pages, and special dates files.  The initial
  2085. X! set of special dates files were modified from earlier net postings contributed
  2086. X! by Rich Kulawiec (rsk@boulder.Colorado.EDU) and
  2087. X! Dick Wexelblat (...decvax!ittvax!wxlvax!rlw), assisted by the following
  2088. X! contributors known only by their network addresses:
  2089. X! (decvax!seismo!rochester!ritcv!ccieng5!ccieng6!wla),
  2090. X! (decvax!sii!mem),
  2091. X! (ittvax!bunker!dick),
  2092. X! (ittvax!decvax!bellcore!yquem!psl),
  2093. X! (ittvax!decvax!harpo!eagle!mhuxl!ihnp4!ihuxw!pector),
  2094. X! and (seismo!rochester!rocksvax!sunybcs!colonel),
  2095. X! in addition to others whose identifications have been lost (speak up!).
  2096. X! .LP
  2097. X  We thank Dr. Omar Afzal of Cornell University (Chairman of the Committee
  2098. X  for Crescent Observation) for his help in implementing the Islamic date
  2099. X  computations.
  2100. END_OF_FILE
  2101. if test 49839 -ne `wc -c <'patches04a'`; then
  2102.     echo shar: \"'patches04a'\" unpacked with wrong size!
  2103. fi
  2104. # end of 'patches04a'
  2105. fi
  2106. echo shar: End of archive 1 \(of 4\).
  2107. cp /dev/null ark1isdone
  2108. MISSING=""
  2109. for I in 1 2 3 4 ; do
  2110.     if test ! -f ark${I}isdone ; then
  2111.     MISSING="${MISSING} ${I}"
  2112.     fi
  2113. done
  2114. if test "${MISSING}" = "" ; then
  2115.     echo You have unpacked all 4 archives.
  2116.     rm -f ark[1-9]isdone
  2117. else
  2118.     echo You still need to unpack the following archives:
  2119.     echo "        " ${MISSING}
  2120. fi
  2121. ##  End of shell archive.
  2122. exit 0
  2123.  
  2124.